﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Code.Models
{
    /// <summary>
    /// 表示某期的状态
    /// </summary>
    public enum IssueState
    {
        /// <summary>
        /// 正常，未开奖
        /// </summary>
        Normal=0,
        /// <summary>
        /// 已开奖
        /// </summary>
        Opened=1,
    }


    public static class IssueStateEx
    {
        public static string GetName(this IssueState state)
        {
            switch (state)
            {
                case IssueState.Opened:
                    return "已开奖";
                case IssueState.Normal:
                    return "未开奖";
                default:
                    throw new ArgumentOutOfRangeException("state");
            }
        }
    }
}
